#ifndef DONORLIST_H
#define DONORLIST_H

#include "DonorType.h"

#include "iostream"

using namespace std;

class Node
{
private:
    DonorType donor;
    Node *next;
public:
	Node();
	Node(DonorType newDonor, Node *newNext);

    void setDonor(const DonorType& newDonor);
    void setNext(Node *newNext);

    DonorType getDonor();
    Node *getNext() const;
};

class DonorList
{
public:
	DonorList();

	void addDonor(const string &newFirst, const string &newLast,
		int newMembershipNo, double donation);

	void createList();

	int getNoOfDonors() const;
	double getTotalDonations() const;

	bool isEmpty() const;
	bool searchID(int membershipNo) const;

	void deleteDonor(int membershipNo);

	void printAllDonors() const;
	void printAllDonations() const;

	void clearList();
    ~DonorList();

    DonorList(const DonorList &);
    DonorList& operator=(const DonorList&);

private:
    void copyCallingObjIsEmpty(const DonorList&);
    void copyObjectsSameLength(const DonorList&);
    void copyCallingObjLonger(const DonorList&);
    void copyCallingObjShorter(const DonorList&);

    Node *first;
    Node *last;
    int count;
};

#endif